{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [],
   "source": [
    "# collect the potential data in darksky api\n",
    "import pandas as pd\n",
    "import requests\n",
    "from datetime import datetime\n",
    "import matplotlib.pyplot as plt\n",
    "import sys\n",
    "sys.path.append('../Resources')\n",
    "from config import dkey"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "unix_time = 1451538000\n",
    "one_day = 86400\n",
    "lat_long = {\n",
    "    'orlando': (28.512274, -81.40619),\n",
    "    'heathrow': (51.471092, -0.455046),\n",
    "    'Phoenix': (33.474250, -112.077456),\n",
    "    'washington': (38.8973, -77.02894),\n",
    "    'sanfranitl': (37.62, -122.365),\n",
    "    'birmingham': (52.452442, -1.743035),\n",
    "    'ottowa': (45.414524, -75.711136),\n",
    "    'sanantonio': (29.419, -98.489),\n",
    "    'saltlake': (40.894524, -111.88771),\n",
    "    'dublin': (53.3498, -6.2603),\n",
    "    'Minneapolis': (44.973814, -93.265767),\n",
    "    'Philadelphia': (39.958187, -75.15964),\n",
    "    'rochester': (43.161617, -77.60488),\n",
    "}\n",
    "url = ('https://api.darksky.net/forecast/{3}/{0},{1},{2}?extend=hourly&units=si')\\\n",
    "        .format(lat_long['orlando'][0], lat_long['orlando'][1], int(unix_time + 18000), dkey)\n",
    "# setup the date to 2016-01-01\n",
    "# because for each call, it return the local day information, so the initial setup time is not mater.\n",
    "unix_time = 1451538000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "lat_long = {\n",
    "    'orlando': (28.512274, -81.40619),\n",
    "    'heathrow': (51.471092, -0.455046),\n",
    "    'Phoenix': (33.474250, -112.077456),\n",
    "    'washington': (38.8973, -77.02894),\n",
    "    'sanfranitl': (37.62, -122.365),\n",
    "    'birmingham': (52.452442, -1.743035),\n",
    "    'ottowa': (45.414524, -75.711136),\n",
    "    'sanantonio': (29.419, -98.489),\n",
    "    'saltlake': (40.894524, -111.88771),\n",
    "    'dublin': (53.3498, -6.2603),\n",
    "    'Minneapolis': (44.973814, -93.265767),\n",
    "    'Philadelphia': (39.958187, -75.15964),\n",
    "    'rochester': (43.161617, -77.60488),\n",
    "}\n",
    "save_dict = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2016-01-16 05:00:00\n",
      "saltlake\n",
      "1180\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-02-05 05:00:00\n",
      "saltlake\n",
      "1200\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-02-25 05:00:00\n",
      "saltlake\n",
      "1220\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-16 05:00:00\n",
      "saltlake\n",
      "1240\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-04-05 05:00:00\n",
      "saltlake\n",
      "1260\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-04-25 05:00:00\n",
      "saltlake\n",
      "1280\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-05-15 05:00:00\n",
      "saltlake\n",
      "1300\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-04 05:00:00\n",
      "saltlake\n",
      "1320\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-24 05:00:00\n",
      "saltlake\n",
      "1340\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-07-14 05:00:00\n",
      "saltlake\n",
      "1360\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-03 05:00:00\n",
      "saltlake\n",
      "1380\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-23 05:00:00\n",
      "saltlake\n",
      "1400\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-09-12 05:00:00\n",
      "saltlake\n",
      "1420\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-02 05:00:00\n",
      "saltlake\n",
      "1440\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-22 05:00:00\n",
      "saltlake\n",
      "1460\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-11-11 05:00:00\n",
      "saltlake\n",
      "1480\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-01 05:00:00\n",
      "saltlake\n",
      "1500\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-12-21 05:00:00\n",
      "saltlake\n",
      "1520\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-01-10 05:00:00\n",
      "saltlake\n",
      "1540\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-01-30 05:00:00\n",
      "saltlake\n",
      "1560\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-19 05:00:00\n",
      "saltlake\n",
      "1580\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-03-11 05:00:00\n",
      "saltlake\n",
      "1600\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-03-31 05:00:00\n",
      "saltlake\n",
      "1620\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-04-20 05:00:00\n",
      "saltlake\n",
      "1640\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-05-10 05:00:00\n",
      "saltlake\n",
      "1660\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-05-30 05:00:00\n",
      "saltlake\n",
      "1680\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-19 05:00:00\n",
      "saltlake\n",
      "1700\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-07-09 05:00:00\n",
      "saltlake\n",
      "1720\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-07-29 05:00:00\n",
      "saltlake\n",
      "1740\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-18 05:00:00\n",
      "saltlake\n",
      "1760\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-09-07 05:00:00\n",
      "saltlake\n",
      "1780\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-09-27 05:00:00\n",
      "saltlake\n",
      "1800\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-17 05:00:00\n",
      "saltlake\n",
      "1820\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-11-06 05:00:00\n",
      "saltlake\n",
      "1840\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-11-26 05:00:00\n",
      "saltlake\n",
      "1860\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-12-16 05:00:00\n",
      "saltlake\n",
      "1880\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-01-05 05:00:00\n",
      "saltlake\n",
      "1900\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-01-25 05:00:00\n",
      "saltlake\n",
      "1920\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-02-14 05:00:00\n",
      "saltlake\n",
      "1940\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-03-06 05:00:00\n",
      "saltlake\n",
      "1960\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-03-26 05:00:00\n",
      "saltlake\n",
      "1980\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-04-15 05:00:00\n",
      "saltlake\n",
      "2000\n",
      "8\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-05-05 05:00:00\n",
      "saltlake\n",
      "2020\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-05-25 05:00:00\n",
      "saltlake\n",
      "2040\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-06-14 05:00:00\n",
      "saltlake\n",
      "2060\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-04 05:00:00\n",
      "saltlake\n",
      "2080\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-24 05:00:00\n",
      "saltlake\n",
      "2100\n",
      "8\n",
      "(23, 17)\n",
      "***********************************\n",
      "2018-08-13 05:00:00\n",
      "saltlake\n",
      "2120\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-09-02 05:00:00\n",
      "saltlake\n",
      "2140\n",
      "8\n",
      "(23, 17)\n",
      "***********************************\n",
      "2018-09-22 05:00:00\n",
      "saltlake\n",
      "2160\n",
      "8\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-10-12 05:00:00\n",
      "saltlake\n",
      "2180\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-11-01 05:00:00\n",
      "saltlake\n",
      "2200\n",
      "8\n",
      "(18, 17)\n",
      "***********************************\n",
      "2018-11-21 05:00:00\n",
      "saltlake\n",
      "2220\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-12-11 05:00:00\n",
      "saltlake\n",
      "2240\n",
      "8\n",
      "(24, 20)\n",
      "***********************************\n",
      "2018-12-31 05:00:00\n",
      "saltlake\n",
      "2260\n",
      "8\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-01-18 05:00:00\n",
      "dublin\n",
      "2280\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-02-07 05:00:00\n",
      "dublin\n",
      "2300\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-02-27 05:00:00\n",
      "dublin\n",
      "2320\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-18 05:00:00\n",
      "dublin\n",
      "2340\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-04-07 05:00:00\n",
      "dublin\n",
      "2360\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-04-27 05:00:00\n",
      "dublin\n",
      "2380\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-05-17 05:00:00\n",
      "dublin\n",
      "2400\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-06 05:00:00\n",
      "dublin\n",
      "2420\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-26 05:00:00\n",
      "dublin\n",
      "2440\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-07-16 05:00:00\n",
      "dublin\n",
      "2460\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-05 05:00:00\n",
      "dublin\n",
      "2480\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-25 05:00:00\n",
      "dublin\n",
      "2500\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-09-14 05:00:00\n",
      "dublin\n",
      "2520\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-10-04 05:00:00\n",
      "dublin\n",
      "2540\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-24 05:00:00\n",
      "dublin\n",
      "2560\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-11-13 05:00:00\n",
      "dublin\n",
      "2580\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-03 05:00:00\n",
      "dublin\n",
      "2600\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-23 05:00:00\n",
      "dublin\n",
      "2620\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-01-12 05:00:00\n",
      "dublin\n",
      "2640\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-01 05:00:00\n",
      "dublin\n",
      "2660\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-21 05:00:00\n",
      "dublin\n",
      "2680\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-03-13 05:00:00\n",
      "dublin\n",
      "2700\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-04-02 05:00:00\n",
      "dublin\n",
      "2720\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-04-22 05:00:00\n",
      "dublin\n",
      "2740\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-05-12 05:00:00\n",
      "dublin\n",
      "2760\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-01 05:00:00\n",
      "dublin\n",
      "2780\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-21 05:00:00\n",
      "dublin\n",
      "2800\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-07-11 05:00:00\n",
      "dublin\n",
      "2820\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-07-31 05:00:00\n",
      "dublin\n",
      "2840\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-20 05:00:00\n",
      "dublin\n",
      "2860\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-09-09 05:00:00\n",
      "dublin\n",
      "2880\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-09-29 05:00:00\n",
      "dublin\n",
      "2900\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-19 05:00:00\n",
      "dublin\n",
      "2920\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-11-08 05:00:00\n",
      "dublin\n",
      "2940\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-11-28 05:00:00\n",
      "dublin\n",
      "2960\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-12-18 05:00:00\n",
      "dublin\n",
      "2980\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-01-07 05:00:00\n",
      "dublin\n",
      "3000\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-01-27 05:00:00\n",
      "dublin\n",
      "3020\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-02-16 05:00:00\n",
      "dublin\n",
      "3040\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-03-08 05:00:00\n",
      "dublin\n",
      "3060\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-03-28 05:00:00\n",
      "dublin\n",
      "3080\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-04-17 05:00:00\n",
      "dublin\n",
      "3100\n",
      "9\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-05-07 05:00:00\n",
      "dublin\n",
      "3120\n",
      "9\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-05-27 05:00:00\n",
      "dublin\n",
      "3140\n",
      "9\n",
      "(24, 12)\n",
      "***********************************\n",
      "2018-06-16 05:00:00\n",
      "dublin\n",
      "3160\n",
      "9\n",
      "(23, 11)\n",
      "***********************************\n",
      "2018-07-06 05:00:00\n",
      "dublin\n",
      "3180\n",
      "9\n",
      "(24, 11)\n",
      "***********************************\n",
      "2018-07-26 05:00:00\n",
      "dublin\n",
      "3200\n",
      "9\n",
      "(23, 11)\n",
      "***********************************\n",
      "2018-08-15 05:00:00\n",
      "dublin\n",
      "3220\n",
      "9\n",
      "(24, 12)\n",
      "***********************************\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2018-09-04 05:00:00\n",
      "dublin\n",
      "3240\n",
      "9\n",
      "(23, 11)\n",
      "***********************************\n",
      "2018-09-24 05:00:00\n",
      "dublin\n",
      "3260\n",
      "9\n",
      "(24, 11)\n",
      "***********************************\n",
      "2018-10-14 05:00:00\n",
      "dublin\n",
      "3280\n",
      "9\n",
      "(24, 11)\n",
      "***********************************\n",
      "2018-11-03 05:00:00\n",
      "dublin\n",
      "3300\n",
      "9\n",
      "(24, 12)\n",
      "***********************************\n",
      "2018-11-23 05:00:00\n",
      "dublin\n",
      "3320\n",
      "9\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-12-13 05:00:00\n",
      "dublin\n",
      "3340\n",
      "9\n",
      "(24, 19)\n",
      "***********************************\n",
      "2019-01-02 05:00:00\n",
      "dublin\n",
      "3360\n",
      "9\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-01-20 05:00:00\n",
      "Minneapolis\n",
      "3380\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-02-09 05:00:00\n",
      "Minneapolis\n",
      "3400\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-02-29 05:00:00\n",
      "Minneapolis\n",
      "3420\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-20 05:00:00\n",
      "Minneapolis\n",
      "3440\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-04-09 05:00:00\n",
      "Minneapolis\n",
      "3460\n",
      "10\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-04-29 05:00:00\n",
      "Minneapolis\n",
      "3480\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-05-19 05:00:00\n",
      "Minneapolis\n",
      "3500\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-08 05:00:00\n",
      "Minneapolis\n",
      "3520\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-28 05:00:00\n",
      "Minneapolis\n",
      "3540\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-07-18 05:00:00\n",
      "Minneapolis\n",
      "3560\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-08-07 05:00:00\n",
      "Minneapolis\n",
      "3580\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-27 05:00:00\n",
      "Minneapolis\n",
      "3600\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-09-16 05:00:00\n",
      "Minneapolis\n",
      "3620\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-10-06 05:00:00\n",
      "Minneapolis\n",
      "3640\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-10-26 05:00:00\n",
      "Minneapolis\n",
      "3660\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-11-15 05:00:00\n",
      "Minneapolis\n",
      "3680\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-05 05:00:00\n",
      "Minneapolis\n",
      "3700\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-25 05:00:00\n",
      "Minneapolis\n",
      "3720\n",
      "10\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-01-14 05:00:00\n",
      "Minneapolis\n",
      "3740\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-03 05:00:00\n",
      "Minneapolis\n",
      "3760\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-23 05:00:00\n",
      "Minneapolis\n",
      "3780\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-03-15 05:00:00\n",
      "Minneapolis\n",
      "3800\n",
      "10\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-04-04 05:00:00\n",
      "Minneapolis\n",
      "3820\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-04-24 05:00:00\n",
      "Minneapolis\n",
      "3840\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-05-14 05:00:00\n",
      "Minneapolis\n",
      "3860\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-03 05:00:00\n",
      "Minneapolis\n",
      "3880\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-23 05:00:00\n",
      "Minneapolis\n",
      "3900\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-07-13 05:00:00\n",
      "Minneapolis\n",
      "3920\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-02 05:00:00\n",
      "Minneapolis\n",
      "3940\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-08-22 05:00:00\n",
      "Minneapolis\n",
      "3960\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-09-11 05:00:00\n",
      "Minneapolis\n",
      "3980\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-01 05:00:00\n",
      "Minneapolis\n",
      "4000\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-21 05:00:00\n",
      "Minneapolis\n",
      "4020\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-11-10 05:00:00\n",
      "Minneapolis\n",
      "4040\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-11-30 05:00:00\n",
      "Minneapolis\n",
      "4060\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-12-20 05:00:00\n",
      "Minneapolis\n",
      "4080\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-01-09 05:00:00\n",
      "Minneapolis\n",
      "4100\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-01-29 05:00:00\n",
      "Minneapolis\n",
      "4120\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-02-18 05:00:00\n",
      "Minneapolis\n",
      "4140\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-03-10 05:00:00\n",
      "Minneapolis\n",
      "4160\n",
      "10\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-03-30 05:00:00\n",
      "Minneapolis\n",
      "4180\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-04-19 05:00:00\n",
      "Minneapolis\n",
      "4200\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-05-09 05:00:00\n",
      "Minneapolis\n",
      "4220\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-05-29 05:00:00\n",
      "Minneapolis\n",
      "4240\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-06-18 05:00:00\n",
      "Minneapolis\n",
      "4260\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-07-08 05:00:00\n",
      "Minneapolis\n",
      "4280\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-28 05:00:00\n",
      "Minneapolis\n",
      "4300\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-08-17 05:00:00\n",
      "Minneapolis\n",
      "4320\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-09-06 05:00:00\n",
      "Minneapolis\n",
      "4340\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-09-26 05:00:00\n",
      "Minneapolis\n",
      "4360\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-10-16 05:00:00\n",
      "Minneapolis\n",
      "4380\n",
      "10\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-11-05 05:00:00\n",
      "Minneapolis\n",
      "4400\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-11-25 05:00:00\n",
      "Minneapolis\n",
      "4420\n",
      "10\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-12-15 05:00:00\n",
      "Minneapolis\n",
      "4440\n",
      "10\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-01-02 05:00:00\n",
      "Philadelphia\n",
      "4460\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-01-22 05:00:00\n",
      "Philadelphia\n",
      "4480\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-02-11 05:00:00\n",
      "Philadelphia\n",
      "4500\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-03-02 05:00:00\n",
      "Philadelphia\n",
      "4520\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-22 05:00:00\n",
      "Philadelphia\n",
      "4540\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-04-11 05:00:00\n",
      "Philadelphia\n",
      "4560\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-05-01 05:00:00\n",
      "Philadelphia\n",
      "4580\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-05-21 05:00:00\n",
      "Philadelphia\n",
      "4600\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-10 05:00:00\n",
      "Philadelphia\n",
      "4620\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-06-30 05:00:00\n",
      "Philadelphia\n",
      "4640\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-07-20 05:00:00\n",
      "Philadelphia\n",
      "4660\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-08-09 05:00:00\n",
      "Philadelphia\n",
      "4680\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-29 05:00:00\n",
      "Philadelphia\n",
      "4700\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-09-18 05:00:00\n",
      "Philadelphia\n",
      "4720\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-08 05:00:00\n",
      "Philadelphia\n",
      "4740\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-28 05:00:00\n",
      "Philadelphia\n",
      "4760\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-11-17 05:00:00\n",
      "Philadelphia\n",
      "4780\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-12-07 05:00:00\n",
      "Philadelphia\n",
      "4800\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-12-27 05:00:00\n",
      "Philadelphia\n",
      "4820\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-01-16 05:00:00\n",
      "Philadelphia\n",
      "4840\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-02-05 05:00:00\n",
      "Philadelphia\n",
      "4860\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-25 05:00:00\n",
      "Philadelphia\n",
      "4880\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-03-17 05:00:00\n",
      "Philadelphia\n",
      "4900\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-04-06 05:00:00\n",
      "Philadelphia\n",
      "4920\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-04-26 05:00:00\n",
      "Philadelphia\n",
      "4940\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-05-16 05:00:00\n",
      "Philadelphia\n",
      "4960\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-05 05:00:00\n",
      "Philadelphia\n",
      "4980\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-25 05:00:00\n",
      "Philadelphia\n",
      "5000\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-07-15 05:00:00\n",
      "Philadelphia\n",
      "5020\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-04 05:00:00\n",
      "Philadelphia\n",
      "5040\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-24 05:00:00\n",
      "Philadelphia\n",
      "5060\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-09-13 05:00:00\n",
      "Philadelphia\n",
      "5080\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-03 05:00:00\n",
      "Philadelphia\n",
      "5100\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-23 05:00:00\n",
      "Philadelphia\n",
      "5120\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-11-12 05:00:00\n",
      "Philadelphia\n",
      "5140\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-12-02 05:00:00\n",
      "Philadelphia\n",
      "5160\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2017-12-22 05:00:00\n",
      "Philadelphia\n",
      "5180\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-01-11 05:00:00\n",
      "Philadelphia\n",
      "5200\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-01-31 05:00:00\n",
      "Philadelphia\n",
      "5220\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-02-20 05:00:00\n",
      "Philadelphia\n",
      "5240\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-03-12 05:00:00\n",
      "Philadelphia\n",
      "5260\n",
      "11\n",
      "(23, 17)\n",
      "***********************************\n",
      "2018-04-01 05:00:00\n",
      "Philadelphia\n",
      "5280\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-04-21 05:00:00\n",
      "Philadelphia\n",
      "5300\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-05-11 05:00:00\n",
      "Philadelphia\n",
      "5320\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-05-31 05:00:00\n",
      "Philadelphia\n",
      "5340\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-06-20 05:00:00\n",
      "Philadelphia\n",
      "5360\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-10 05:00:00\n",
      "Philadelphia\n",
      "5380\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-30 05:00:00\n",
      "Philadelphia\n",
      "5400\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-08-19 05:00:00\n",
      "Philadelphia\n",
      "5420\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-09-08 05:00:00\n",
      "Philadelphia\n",
      "5440\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-09-28 05:00:00\n",
      "Philadelphia\n",
      "5460\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-10-18 05:00:00\n",
      "Philadelphia\n",
      "5480\n",
      "11\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-11-07 05:00:00\n",
      "Philadelphia\n",
      "5500\n",
      "11\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-11-27 05:00:00\n",
      "Philadelphia\n",
      "5520\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-12-17 05:00:00\n",
      "Philadelphia\n",
      "5540\n",
      "11\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-01-04 05:00:00\n",
      "rochester\n",
      "5560\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-01-24 05:00:00\n",
      "rochester\n",
      "5580\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-02-13 05:00:00\n",
      "rochester\n",
      "5600\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-04 05:00:00\n",
      "rochester\n",
      "5620\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-03-24 05:00:00\n",
      "rochester\n",
      "5640\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2016-04-13 05:00:00\n",
      "rochester\n",
      "5660\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-05-03 05:00:00\n",
      "rochester\n",
      "5680\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-05-23 05:00:00\n",
      "rochester\n",
      "5700\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-06-12 05:00:00\n",
      "rochester\n",
      "5720\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-07-02 05:00:00\n",
      "rochester\n",
      "5740\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-07-22 05:00:00\n",
      "rochester\n",
      "5760\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-08-11 05:00:00\n",
      "rochester\n",
      "5780\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2016-08-31 05:00:00\n",
      "rochester\n",
      "5800\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-09-20 05:00:00\n",
      "rochester\n",
      "5820\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-10 05:00:00\n",
      "rochester\n",
      "5840\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-10-30 05:00:00\n",
      "rochester\n",
      "5860\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-11-19 05:00:00\n",
      "rochester\n",
      "5880\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-09 05:00:00\n",
      "rochester\n",
      "5900\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2016-12-29 05:00:00\n",
      "rochester\n",
      "5920\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-01-18 05:00:00\n",
      "rochester\n",
      "5940\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-02-07 05:00:00\n",
      "rochester\n",
      "5960\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-02-27 05:00:00\n",
      "rochester\n",
      "5980\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-03-19 05:00:00\n",
      "rochester\n",
      "6000\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-04-08 05:00:00\n",
      "rochester\n",
      "6020\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-04-28 05:00:00\n",
      "rochester\n",
      "6040\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-05-18 05:00:00\n",
      "rochester\n",
      "6060\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-06-07 05:00:00\n",
      "rochester\n",
      "6080\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-06-27 05:00:00\n",
      "rochester\n",
      "6100\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-07-17 05:00:00\n",
      "rochester\n",
      "6120\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-06 05:00:00\n",
      "rochester\n",
      "6140\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-08-26 05:00:00\n",
      "rochester\n",
      "6160\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-09-15 05:00:00\n",
      "rochester\n",
      "6180\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-10-05 05:00:00\n",
      "rochester\n",
      "6200\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-10-25 05:00:00\n",
      "rochester\n",
      "6220\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2017-11-14 05:00:00\n",
      "rochester\n",
      "6240\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2017-12-04 05:00:00\n",
      "rochester\n",
      "6260\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2017-12-24 05:00:00\n",
      "rochester\n",
      "6280\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-01-13 05:00:00\n",
      "rochester\n",
      "6300\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-02-02 05:00:00\n",
      "rochester\n",
      "6320\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-02-22 05:00:00\n",
      "rochester\n",
      "6340\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-03-14 05:00:00\n",
      "rochester\n",
      "6360\n",
      "12\n",
      "(24, 19)\n",
      "***********************************\n",
      "2018-04-03 05:00:00\n",
      "rochester\n",
      "6380\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-04-23 05:00:00\n",
      "rochester\n",
      "6400\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-05-13 05:00:00\n",
      "rochester\n",
      "6420\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-06-02 05:00:00\n",
      "rochester\n",
      "6440\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-06-22 05:00:00\n",
      "rochester\n",
      "6460\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-07-12 05:00:00\n",
      "rochester\n",
      "6480\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-08-01 05:00:00\n",
      "rochester\n",
      "6500\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-08-21 05:00:00\n",
      "rochester\n",
      "6520\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-09-10 05:00:00\n",
      "rochester\n",
      "6540\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-09-30 05:00:00\n",
      "rochester\n",
      "6560\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n",
      "2018-10-20 05:00:00\n",
      "rochester\n",
      "6580\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-11-09 05:00:00\n",
      "rochester\n",
      "6600\n",
      "12\n",
      "(24, 17)\n",
      "***********************************\n",
      "2018-11-29 05:00:00\n",
      "rochester\n",
      "6620\n",
      "12\n",
      "(24, 20)\n",
      "***********************************\n",
      "2018-12-19 05:00:00\n",
      "rochester\n",
      "6640\n",
      "12\n",
      "(24, 18)\n",
      "***********************************\n"
     ]
    }
   ],
   "source": [
    "# run the whole loop\n",
    "for key in lat_long_1.keys():\n",
    "    # initial unit time\n",
    "    unix_time = 1451538000\n",
    "    # setup the final date 2018-01-01\n",
    "    while unix_time <= 1546318800:\n",
    "        # setup the url and request the data\n",
    "        url = ('https://api.darksky.net/forecast/{3}/{0},{1},{2}?extend=hourly')\\\n",
    "            .format(lat_long_1[key][0], lat_long_1[key][1], int(unix_time), dkey)\n",
    "        temp_data = requests.get(url).json()\n",
    "        # get the hourly information and put into a dataframe to concat into df_filled\n",
    "        temp_data = temp_data['hourly']['data']\n",
    "        df_temp = pd.DataFrame(temp_data)\n",
    "        df_temp['site_id'] = site_id\n",
    "        df_temp.time = pd.to_datetime(df_temp['time'],unit='s')\n",
    "        df_filled = pd.concat([df_filled, df_temp], ignore_index=True, sort = 'False')\n",
    "        unix_time += one_day\n",
    "        i += 1\n",
    "        # print the data to check working\n",
    "        if i % 20 == 0:\n",
    "            print(datetime.utcfromtimestamp(unix_time))\n",
    "            print(key)\n",
    "            print(i)\n",
    "            print(site_id)\n",
    "            print(df_temp.shape)\n",
    "            print('*' * 35)\n",
    "    save_dict.append(key)\n",
    "    site_id += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_filled.to_csv('../Large_output/csv/filled_initial.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n",
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n",
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n",
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n",
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n",
      "apparentTemperature        1\n",
      "cloudCover                66\n",
      "dewPoint                   0\n",
      "humidity                   1\n",
      "icon                      72\n",
      "ozone                  25227\n",
      "precipAccumulation     26321\n",
      "precipIntensity           60\n",
      "precipProbability         60\n",
      "precipType             24963\n",
      "pressure                   7\n",
      "site_id                    0\n",
      "summary                   72\n",
      "temperature                1\n",
      "time                       0\n",
      "uvIndex                   41\n",
      "visibility                44\n",
      "windBearing             1316\n",
      "windGust                  44\n",
      "windSpeed                  7\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "for i in range(6):\n",
    "    print(df_filled.loc[df_filled['site_id'] == 4,:].isna().sum())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "clear-night            72658\n",
       "partly-cloudy-day      65455\n",
       "clear-day              60477\n",
       "cloudy                 53365\n",
       "partly-cloudy-night    45704\n",
       "rain                   18763\n",
       "fog                     4230\n",
       "snow                    1032\n",
       "wind                     230\n",
       "sleet                    184\n",
       "Name: icon, dtype: int64"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_filled.icon.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
